<h1>New event</h1>

<script type="text/javascript">
function OnSubmitForm()
{
  if(document.pressed == 'Create')
  {
   document.myform.action ="create";
  }
  else
  if(document.pressed == 'upload')
  {
    document.myform.action ="uploadfile";
  }
  else
  if(document.pressed == 'Another Files')
  {
    document.myform.action ="up_another_imges";
  }

}
</script>
<form name="myform" action="create" method="post" enctype="multipart/form-data">
	<div align="center">
	<table border="1" width="100%" id="table1">
	<tr>
		<td width="50%">
		<p align="right">Tên s&#7921; ki&#7879;n:</td>
		<td width="50%">
			<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
			<p align="left"><input type="text" name="event[name]" size="20"></p>
		</td>
	</tr>
	<tr>
		<td width="50%" height="40">
		<p align="right">Kênh:</td>
			<td width="23" height="47"><select name="event[channel_id]" >
					<% @channels.each do |channel| %>
						<option value= <%= channel.id %> > <%= channel.name %></option>
					<% end %>
				</select>
			</td>
	</tr>
	<tr>
		<td width="50%">
			<p align="right"><input type="submit" value="Create" name="B1" align="right"></p> 
		</td>
		<td>
			
		</td>
	</tr>
</table>
</form>
  
<%= link_to 'Back', events_path %>
